<%@ include file="/common/taglibs.jsp"%>
<%
response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
response.setHeader("Pragma","no-cache"); //HTTP 1.0
response.setDateHeader ("Expires", 0); //prevent caching at the proxy server
%>

<head>
    <title><fmt:message key="wizardventas.title"/></title>
    <meta name="heading" content="<fmt:message key='wizardventas.heading'/>"/>
    <script type="text/javascript">
    	busquedaVentaConsumo('');
	</script>
</head>

<form:form id="ventaslist">
<input type="hidden" id="coClientePersona_ventaID" value="${coClientePersona}" />
<input type="hidden" id="flagWizard" value="ventaconsumo" />

	<fieldset style="width: 400px">
	<legend><fmt:message key="common.filtros.busqueda"/></legend><br/>
		
		<div>
			<fmt:message key="common.cliente.persona"/><br/>
			<input id="deClientePersona_venta" readonly="readonly" value="${deClientePersona}" class="text mediumlarge" />
		</div><br/>
		
		<div>
			<fmt:message key="common.estacion"/><br/>
			<select class="text mediumlarge" id="coEstacionID">
        		<c:forEach var="bean" items="${listEstaciones}">
	        		<option value="${bean.id}">
	        			${bean.deEstacion}
	        		</option>
	        	</c:forEach>
       		</select>			
		</div><br/>
		
		<div>
			<fmt:message key="wizardventas.fechaventaini"/><br/>
			<input id="iniFechaVentaID" class="text medium" maxlength="12" size="11" />
			<input type="button" class="buttoncal" id="iniFechaVentaCal" value="..."/>  [<fmt:message key="date.format"/>]
			<script type="text/javascript">
	          new Calendar({
	                  inputField: "iniFechaVentaID",		
	                  dateFormat: "%d/%m/%Y",
	                  trigger	: "iniFechaVentaCal",	
	                  bottomBar	: false,
	                  onSelect	: function() {
	                 		  this.hide();
	                  }
	          });
	        </script>
		</div><br/>
		
		<div>
			<fmt:message key="wizardventas.fechaventafin"/><br/>
			<input id="finFechaVentaID" class="text medium" maxlength="12" size="11" />
			<input type="button" class="buttoncal" id="finFechaVentaCal" value="..."/>  [<fmt:message key="date.format"/>]
			<script type="text/javascript">
	          new Calendar({
	                  inputField: "finFechaVentaID",		
	                  dateFormat: "%d/%m/%Y",
	                  trigger	: "finFechaVentaCal",	
	                  bottomBar	: false,
	                  onSelect	: function() {
	                 		  this.hide();
	                  }
	          });
	        </script>
		</div><br/>
		
		<div>
			<fmt:message key="common.placa"/><br/>
			<input type="text" id="dePlacaID" class="text medium" maxlength="255" />
		</div><br/>
		
		<div>
			<fmt:message key="wizardventas.precioventaini"/><br/>
			<input type="text" id="vaPrecioVentaIniID" class="text medium" maxlength="20" />
		</div><br/>
		
		<div>
			<fmt:message key="wizardventas.precioventafin"/><br/>
			<input type="text" id="vaPrecioVentaFinID" class="text medium" maxlength="20" />
		</div><br/>
		
		<div>
			<fmt:message key="wizardventas.online"/><br/>
	        <select class="text medium" id="stOnlineID" >
	        	<option value="-1"><fmt:message key="label.itemdefault"/></option>
				<option value="N"><fmt:message key="common.yes"/></option>
				<option value="F"><fmt:message key="common.no"/></option>
	       	</select>
	    </div><br/>
		
		<div>
			<fmt:message key="label.habilitado"/><br/>
	        <select class="text medium" id="stVentaID" >
	        	<option value="-1"><fmt:message key="label.itemdefault"/></option>
				<option value="A"><fmt:message key="common.yes"/></option>
				<option value="I"><fmt:message key="common.no"/></option>
	       	</select>
	    </div><br/>
				
		<div>
			<input type="button" onclick="busquedaVentaConsumo()" value="<fmt:message key="button.search"/>"/>
		</div>					
		</fieldset><br/>
		
		<div id="displayTable">
			<%@ include file="ventasconsumo.jsp"%>			
		</div>
</form:form>